/// 当前页结果集
class GiftCardCategoryPageResponseDto {
  /// 主键id
  final int? id;
  /// 卡种类id
  final int? typeId;
  /// 卡种类名称
  final String? typeName;
  /// 卡种类icon地址
  final String? iconUrl;
  /// 卡分类名称
  final String? categoryName;
  /// 折扣，小数
  final String? discount;
  /// 最小额度
  final int? minimum;
  /// 预计核销处理时长，单位：分钟
  final int? takeTime;
  /// 数据状态（1-有效，0-无效）
  final int? status;

  GiftCardCategoryPageResponseDto({
    this.id,
    this.typeId,
    this.typeName,
    this.iconUrl,
    this.categoryName,
    this.discount,
    this.minimum,
    this.takeTime,
    this.status,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (id != null) data['id'] = id;
    if (typeId != null) data['typeId'] = typeId;
    if (typeName != null) data['typeName'] = typeName;
    if (iconUrl != null) data['iconUrl'] = iconUrl;
    if (categoryName != null) data['categoryName'] = categoryName;
    if (discount != null) data['discount'] = discount;
    if (minimum != null) data['minimum'] = minimum;
    if (takeTime != null) data['takeTime'] = takeTime;
    if (status != null) data['status'] = status;
    return data;
  }

  factory GiftCardCategoryPageResponseDto.fromJson(Map<String, dynamic> json) {
    return GiftCardCategoryPageResponseDto(
      id: json['id'],
      typeId: json['typeId'],
      typeName: json['typeName'],
      iconUrl: json['iconUrl'],
      categoryName: json['categoryName'],
      discount: json['discount'],
      minimum: json['minimum'],
      takeTime: json['takeTime'],
      status: json['status'],
    );
  }
}